
import { Column, CreateDateColumn, DeleteDateColumn, Entity, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
@Entity('menu_tb')
export class Menu {
    @PrimaryGeneratedColumn({ type: 'bigint', comment: '菜单id' })
    menu_id: number;
    @Column({ default: null, comment: '菜单名称' })
    menu_name: string;
    @Column({ default: 0, comment: '父级菜单id' })
    parent_id: number;
    @Column({ default: 0, comment: '显示顺序' })
    order_num: number
    @Column({ default: null, comment: '路径' })
    path: string;
    @Column({ default: null, comment: '组件名称' })
    component: string;
    @Column({ default: null, comment: '路径参数' })
    query: string;
    @Column({ default: 1, comment: '是否是外链 0 是 1否' })
    is_frame: number;
    @Column({ default: 0, comment: '是否缓存 0 是 1 否' })
    is_cache: number;
    @Column({ default: null, comment: '菜单类型 M目录 C菜单 F按钮' })
    menu_type: string;
    @Column({ default: 0, comment: '是否显示 0 显示 1 隐藏' })
    visible: number;
    @Column({ default: 0, comment: '菜单状态 0 正常 1 禁用' })
    status: number;
    @Column({ default: null, comment: '权限标识 系统:模块:功能' })
    perms: string;
    @Column({ default: null, comment: '菜单图标' })
    icon: string;
    @Column({ default: null, comment: '备注' })
    remark: string;
    @CreateDateColumn({comment: '创建日期'})
    create_time: Date;
    @UpdateDateColumn({comment: '更新时间'})
    update_time: Date;
    @DeleteDateColumn({ comment: '删除日期',})
    delete_time: Date;
    // 不在数据库显示的字段
    children: [];
}



